import { createStore } from 'vuex'
import { createVuexPersistedState } from 'vue-persistedstate'

import cart from './modules/cart'
import category from './modules/category'
import user from './modules/user'

export default createStore({
  state: {
  },
  mutations: {
  },
  actions: {
  },
  modules: {
    cart,
    category,
    user
  },
  plugins: [
    createVuexPersistedState({
      key: 'erabbit-client-pc-store',
      storage: window.localStorage,
      whiteList: ['user', 'cart']
    })
  ]
})
